﻿Imports System.Data.OracleClient
Imports System.IO
Imports System.Collections.Generic
Imports System.Web.Security
Imports System.Data

Public Class BSCSCampaignFee
    'Inherits System.Web.UI.Page
    Inherits [lib].BasePage

    Dim DataEngine As New BSCSCampaignDefinition


    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Me.PageTitle = "Kampanya Ücret Bilgileri"
        Session("_CampaignFeeDefinition") = Nothing

        If (Not IsPostBack) Then
        End If


    End Sub

    Private Sub GeneralViewControl()
        commitmentType.Visible = ddlTariffType.SelectedValue.Equals("Kurumsal")
        fpmMasterMsisdn.Visible = ddlTariffType.SelectedValue.Equals("Fpm")
        fpmWaDetails.Visible = ddlTariffType.SelectedValue.Equals("Fpm")
        UcretGrubuSayisi.Visible = ddlTariffType.SelectedValue.Equals("Other")
        pbcDetail.Visible = commitmentType.Visible And ddlCommitmentType.SelectedValue.Equals("Kurumsal")
        reason.Visible = ddlUcretGroupNumber.SelectedIndex <> 0 And ddlTariffType.SelectedValue.Equals("Other")

        PriceGroups.Visible = UcretGrubuSayisi.Visible And ddlUcretGroupNumber.SelectedIndex > 0
        PriceGroups1.Visible = UcretGrubuSayisi.Visible And ddlUcretGroupNumber.SelectedIndex > 0
        priceGroup1.Visible = UcretGrubuSayisi.Visible And ddlUcretGroupNumber.SelectedIndex > 0
        priceGroup2.Visible = UcretGrubuSayisi.Visible And ddlUcretGroupNumber.SelectedIndex > 1
        priceGroup3.Visible = UcretGrubuSayisi.Visible And ddlUcretGroupNumber.SelectedIndex > 2
        PriceGroups2.Visible = UcretGrubuSayisi.Visible And ddlUcretGroupNumber.SelectedIndex > 3
        priceGroup4.Visible = UcretGrubuSayisi.Visible And ddlUcretGroupNumber.SelectedIndex > 3
        PriceGroup5.Visible = UcretGrubuSayisi.Visible And ddlUcretGroupNumber.SelectedIndex > 4
        PriceGroup6.Visible = UcretGrubuSayisi.Visible And ddlUcretGroupNumber.SelectedIndex > 5
        SubmitPriceGroups.Visible = PriceGroups1.Visible
        TariffRegistrationFee.Visible = Not ddlTariffType.SelectedValue.Equals("Kurumsal")
    End Sub

    Dim index As String
    Dim nodeIndex As Integer    

    Private Sub BuildPriceGroupTree()
        treePriceGroup.Nodes.Clear()
        Dim dt As New DataTable
        Dim lbAllGroups As New ListBox
        For Each li As ListItem In lstPriceGroup1.Items
            If li.Value > 0 Then
                lbAllGroups.Items.Add(li)
            End If
        Next
        For Each li As ListItem In lstPriceGroup2.Items
            If li.Value > 0 Then
                lbAllGroups.Items.Add(li)
            End If
        Next
        For Each li As ListItem In lstPriceGroup3.Items
            If li.Value > 0 Then
                lbAllGroups.Items.Add(li)
            End If
        Next
        For Each li As ListItem In lstPriceGroup4.Items
            If li.Value > 0 Then
                lbAllGroups.Items.Add(li)
            End If
        Next
        For Each li As ListItem In lstPriceGroup5.Items
            If li.Value > 0 Then
                lbAllGroups.Items.Add(li)
            End If
        Next
        For Each li As ListItem In lstPriceGroup6.Items
            If li.Value > 0 Then
                lbAllGroups.Items.Add(li)
            End If
        Next
        dt = DataEngine.GetPriceGroupNodes(lbAllGroups)
        For Each row As DataRow In dt.Rows
            If row(3) = 0 Then
                Dim node As New TreeNode()
                node.Text = row(1)
                node.Value = row(0)
                For Each row2 As DataRow In dt.Rows
                    If (row2(3) = 1 And row2(2) = row(0)) Then
                        Dim node2 As New TreeNode()
                        node2.Text = row2(1)
                        node2.Value = row2(0)
                        node.ChildNodes.Add(node2)
                    End If
                Next
                node.PopulateOnDemand = node.ChildNodes.Count = 0
                treePriceGroup.Nodes.Add(node)
            End If
        Next
    End Sub

    Private Sub AddPriceItemsToList(ByVal lst As ListBox)
        Dim isCheckedAny As Boolean = False

        For Each node As TreeNode In treePriceGroup.Nodes
            For Each childNode As TreeNode In node.ChildNodes
                If childNode.Checked Then
                    isCheckedAny = True
                End If
            Next
        Next

        If Not isCheckedAny Then
            Return
        End If

        For Each node As TreeNode In treePriceGroup.Nodes
            For Each childNode As TreeNode In node.ChildNodes
                If childNode.Checked Then
                    Dim isProcessed As Boolean = False


                    For Each item As ListItem In lst.Items
                        If item.Value < 0 And item.Text.Equals(node.Text) Then
                            'lst.Items.Insert(lst.Items.IndexOf(item) + 1, New ListItem("• " & childNode.Text, childNode.Value))

                            isProcessed = True
                        End If
                    Next


                    If isProcessed Then
                        Dim lstBU As New ListBox
                        For Each item As ListItem In lst.Items
                            Dim newItem As New ListItem

                            newItem.Text = item.Text
                            newItem.Value = item.Value
                            lstBU.Items.Add(newItem)
                            If item.Value < 0 And item.Text.Equals(node.Text) Then
                                lstBU.Items.Add(New ListItem("• " & childNode.Text, childNode.Value))
                            End If
                        Next
                        lst.Items.Clear()
                        For Each item As ListItem In lstBU.Items
                            lst.Items.Add(New ListItem(item.Text, item.Value))
                        Next
                    Else
                        Dim newItemParent As New ListItem

                        newItemParent.Value = node.Value
                        newItemParent.Text = node.Text
                        lst.Items.Add(newItemParent)

                        Dim newItemChild As New ListItem

                        newItemChild.Value = childNode.Value
                        newItemChild.Text = "• " & childNode.Text
                        lst.Items.Add(newItemChild)
                    End If
                End If
            Next
        Next

        BuildPriceGroupTree()

    End Sub

    Protected Sub ddlTariffType_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ddlTariffType.SelectedIndexChanged
        GeneralViewControl()
    End Sub

    Protected Sub ddlCommitmentType_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ddlCommitmentType.SelectedIndexChanged
        GeneralViewControl()
    End Sub

    Protected Sub ddlUcretGroupNumber_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ddlUcretGroupNumber.SelectedIndexChanged
        GeneralViewControl()
        lstPriceGroup1.Items.Clear()
        lstPriceGroup2.Items.Clear()
        lstPriceGroup3.Items.Clear()
        lstPriceGroup4.Items.Clear()
        lstPriceGroup5.Items.Clear()
        lstPriceGroup6.Items.Clear()
        BuildPriceGroupTree()

        If ddlUcretGroupNumber.SelectedValue.Equals("1") Then
            For Each node As TreeNode In treePriceGroup.Nodes
                node.Checked = True
                For Each childNode As TreeNode In node.ChildNodes
                    childNode.Checked = True
                Next
            Next
            AddPriceItemsToList(lstPriceGroup1)
        End If
    End Sub

    Protected Sub btnPriceGroup1Add_Click(sender As Object, e As EventArgs) Handles btnPriceGroup1Add.Click
        AddPriceItemsToList(lstPriceGroup1)
    End Sub

    Protected Sub btnPriceGroup1RemoveAll_Click(sender As Object, e As EventArgs) Handles btnPriceGroup1RemoveAll.Click
        lstPriceGroup1.Items.Clear()
        BuildPriceGroupTree()
    End Sub

    Protected Sub btnPriceGroup2Add_Click(sender As Object, e As EventArgs) Handles btnPriceGroup2Add.Click
        AddPriceItemsToList(lstPriceGroup2)
    End Sub

    Protected Sub btnPriceGroup2RemoveAll_Click(sender As Object, e As EventArgs) Handles btnPriceGroup2RemoveAll.Click
        lstPriceGroup2.Items.Clear()
        BuildPriceGroupTree()
    End Sub

    Protected Sub btnPriceGroup3Add_Click(sender As Object, e As EventArgs) Handles btnPriceGroup3Add.Click
        AddPriceItemsToList(lstPriceGroup3)
    End Sub

    Protected Sub btnPriceGroup3RemoveAll_Click(sender As Object, e As EventArgs) Handles btnPriceGroup3RemoveAll.Click
        lstPriceGroup3.Items.Clear()
        BuildPriceGroupTree()
    End Sub

    Protected Sub btnPriceGroup4Add_Click(sender As Object, e As EventArgs) Handles btnPriceGroup4Add.Click
        AddPriceItemsToList(lstPriceGroup4)
    End Sub

    Protected Sub btnPriceGroup5Add_Click(sender As Object, e As EventArgs) Handles btnPriceGroup5Add.Click
        AddPriceItemsToList(lstPriceGroup5)
    End Sub

    Protected Sub btnPriceGroup6Add_Click(sender As Object, e As EventArgs) Handles btnPriceGroup6Add.Click
        AddPriceItemsToList(lstPriceGroup6)
    End Sub


    Protected Sub btnPriceGroup4RemoveAll_Click(sender As Object, e As EventArgs) Handles btnPriceGroup4RemoveAll.Click
        lstPriceGroup4.Items.Clear()
        BuildPriceGroupTree()
    End Sub

    Protected Sub btnPriceGroup5RemoveAll_Click(sender As Object, e As EventArgs) Handles btnPriceGroup5RemoveAll.Click
        lstPriceGroup5.Items.Clear()
        BuildPriceGroupTree()
    End Sub

    Protected Sub btnPriceGroup6RemoveAll_Click(sender As Object, e As EventArgs) Handles btnPriceGroup6RemoveAll.Click
        lstPriceGroup6.Items.Clear()
        BuildPriceGroupTree()
    End Sub

    Protected Sub saveButton_Click(sender As Object, e As EventArgs) Handles saveButton.Click

    End Sub

    Protected Sub btnCommitPriceGroups_Click(sender As Object, e As EventArgs) Handles btnCommitPriceGroups.Click
        Dim basePrice As Double = 0
        lblMissingPriceInfo.Visible = False

        If priceGroup1.Visible Then
            If Not txtMFwoCommitmentGp1.Text.Equals("") Then
                If Convert.ToDouble(txtMFwoCommitmentGp1.Text) > basePrice Then
                    basePrice = CDbl(txtMFwoCommitmentGp1.Text)
                End If
            Else
                lblMissingPriceInfo.Visible = True
            End If
        End If
        If priceGroup2.Visible Then
            If Not txtMFwoCommitmentGp2.Text.Equals("") Then
                If CDbl(txtMFwoCommitmentGp2.Text) > basePrice Then
                    basePrice = CDbl(txtMFwoCommitmentGp2.Text)
                End If
            Else
                lblMissingPriceInfo.Visible = True
            End If
        End If
        If priceGroup3.Visible Then
            If Not txtMFwoCommitmentGp3.Text.Equals("") Then
                If CDbl(txtMFwoCommitmentGp3.Text) > basePrice Then
                    basePrice = CDbl(txtMFwoCommitmentGp3.Text)
                End If
            Else
                lblMissingPriceInfo.Visible = True
            End If
        End If
        If priceGroup4.Visible Then
            If Not txtMFwoCommitmentGp4.Text.Equals("") Then
                If CDbl(txtMFwoCommitmentGp4.Text) > basePrice Then
                    basePrice = CDbl(txtMFwoCommitmentGp4.Text)
                End If
            Else
                lblMissingPriceInfo.Visible = True
            End If
        End If
        If priceGroup5.Visible Then
            If Not txtMFwoCommitmentGp5.Text.Equals("") Then
                If CDbl(txtMFwoCommitmentGp5.Text) > basePrice Then
                    basePrice = CDbl(txtMFwoCommitmentGp5.Text)
                End If
            Else
                lblMissingPriceInfo.Visible = True
            End If
        End If
        If priceGroup6.Visible Then
            If Not txtMFwoCommitmentGp6.Text.Equals("") Then
                If CDbl(txtMFwoCommitmentGp6.Text) > basePrice Then
                    basePrice = CDbl(txtMFwoCommitmentGp6.Text)
                End If
            Else
                lblMissingPriceInfo.Visible = True
            End If
        End If
        If Not lblMissingPriceInfo.Visible Then
            lblMissingPriceInfo.Visible = (treePriceGroup.Nodes.Count <> 0)
        End If

        If Not lblMissingPriceInfo.Visible Then
            lblTariffBasePrice.Text = basePrice.ToString & "TL"
        End If

        lblCompletedPriceInfo.Visible = Not lblMissingPriceInfo.Visible
        BasePriceField.Visible = lblCompletedPriceInfo.Visible
        TariffOverPriceVoice.Visible = lblCompletedPriceInfo.Visible
        TariffOverPriceData.Visible = lblCompletedPriceInfo.Visible
        reason.Visible = (treePriceGroup.Nodes.Count <> 0)
        FeeShare.Visible = Not lblMissingPriceInfo.Visible
        MonthyFeeProration.Visible = Not lblMissingPriceInfo.Visible
        GeneralViewControl()

    End Sub

    Protected Sub RadioButtonList1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RadioButtonList1.SelectedIndexChanged
        FeeShareAmount.Visible = RadioButtonList1.SelectedValue.Equals("Tutar")
        FeeShareRate.Visible = RadioButtonList1.SelectedValue.Equals("Yuzde")
        RateAmount.Visible = RadioButtonList1.SelectedValue.Equals("Tutar")
        NetAmount.Visible = RadioButtonList1.SelectedValue.Equals("Yuzde")
        TextBox1.Text = ""
        TextBox2.Text = ""
        TextBox3.Text = ""
        TextBox4.Text = ""
        lblRateAmountSes.Text = ""
        lblRateAmountData.Text = ""
        lblNetAmountSes.Text = ""
        lblNetAmountData.Text = ""
    End Sub

    Protected Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
        If TextBox1.Text = "" Then
            TextBox2.Text = ""
            lblRateAmountSes.Text = ""
            lblRateAmountData.Text = ""
            Return
        ElseIf Not IsNumeric(TextBox1.Text) Then
            Alert("Sadece sayısal değer giriniz!", Me)
            TextBox1.Text = ""
            TextBox2.Text = ""
            lblRateAmountSes.Text = ""
            lblRateAmountData.Text = ""
            Return
        ElseIf CDbl(TextBox1.Text) > CDbl(lblTariffBasePrice.Text) Then
            Alert("Girilen değer tarife baz fiyatından büyük olamaz!", Me)
            TextBox1.Text = ""
            TextBox2.Text = ""
            lblRateAmountSes.Text = ""
            lblRateAmountData.Text = ""
            Return
        ElseIf CDbl(TextBox1.Text) < 0 Then
            Alert("Girilen değer sıfırdan küçük olamaz!", Me)
            TextBox1.Text = ""
            TextBox2.Text = ""
            lblRateAmountSes.Text = ""
            lblRateAmountData.Text = ""
            Return
        End If
        TextBox2.Text = CDbl(lblTariffBasePrice.Text) - CDbl(TextBox1.Text)

        lblRateAmountSes.Text = "Ses: %" & Math.Round(100 * CDbl(TextBox1.Text) / CDbl(lblTariffBasePrice.Text), 6)
        lblRateAmountSes.Visible = True
        lblRateAmountData.Text = "Data: %" & Math.Round(100 * CDbl(TextBox2.Text) / CDbl(lblTariffBasePrice.Text), 6)
        lblRateAmountData.Visible = True
    End Sub

    Protected Sub TextBox2_TextChanged(sender As Object, e As EventArgs) Handles TextBox2.TextChanged
        If TextBox2.Text = "" Then
            TextBox1.Text = ""
            lblRateAmountSes.Text = ""
            lblRateAmountData.Text = ""
            Return
        ElseIf Not IsNumeric(TextBox2.Text) Then
            Alert("Sadece sayısal değer giriniz!", Me)
            TextBox1.Text = ""
            TextBox2.Text = ""
            lblRateAmountSes.Text = ""
            lblRateAmountData.Text = ""
            Return
        ElseIf CDbl(TextBox2.Text) > CDbl(lblTariffBasePrice.Text) Then
            Alert("Girilen değer tarife baz fiyatından büyük olamaz!", Me)
            TextBox2.Text = ""
            TextBox1.Text = ""
            lblRateAmountSes.Text = ""
            lblRateAmountData.Text = ""
            Return
        ElseIf CDbl(TextBox2.Text) < 0 Then
            Alert("Girilen değer sıfırdan küçük olamaz!", Me)
            TextBox2.Text = ""
            TextBox1.Text = ""
            lblRateAmountSes.Text = ""
            lblRateAmountData.Text = ""
            Return
        End If
        TextBox1.Text = CDbl(lblTariffBasePrice.Text) - CDbl(TextBox2.Text)

        lblRateAmountSes.Text = "Ses: %" & Math.Round(100 * CDbl(TextBox1.Text) / CDbl(lblTariffBasePrice.Text), 6)
        lblRateAmountSes.Visible = True
        lblRateAmountData.Text = "Data: %" & Math.Round(100 * CDbl(TextBox2.Text) / CDbl(lblTariffBasePrice.Text), 6)
        lblRateAmountData.Visible = True
    End Sub

    Protected Sub TextBox3_TextChanged(sender As Object, e As EventArgs) Handles TextBox3.TextChanged
        If TextBox3.Text = "" Then
            TextBox4.Text = ""
            lblNetAmountSes.Text = ""
            lblNetAmountData.Text = ""
            Return
        ElseIf Not IsNumeric(TextBox3.Text) Then
            Alert("Sadece sayısal değer giriniz!", Me)
            TextBox3.Text = ""
            TextBox4.Text = ""
            lblNetAmountSes.Text = ""
            lblNetAmountData.Text = ""
            Return
        ElseIf Not ((0 <= CDbl(TextBox3.Text)) AndAlso (CDbl(TextBox3.Text) <= 100)) Then
            Alert("Girilen değer 0 ve 100 arasında olmalıdır!", Me)
            TextBox3.Text = ""
            TextBox4.Text = ""
            lblNetAmountSes.Text = ""
            lblNetAmountData.Text = ""
            Return
        End If
        TextBox4.Text = 100 - CDbl(TextBox3.Text)

        lblNetAmountSes.Text = Math.Round(CDbl(lblTariffBasePrice.Text) * CDbl(TextBox3.Text) / 100, 6)
        lblNetAmountSes.Visible = True
        lblNetAmountData.Text = Math.Round(CDbl(lblTariffBasePrice.Text) * CDbl(TextBox4.Text) / 100, 6)
        lblNetAmountData.Visible = True

    End Sub


    Protected Sub TextBox4_TextChanged(sender As Object, e As EventArgs) Handles TextBox4.TextChanged
        If TextBox4.Text = "" Then
            TextBox3.Text = ""
            lblNetAmountSes.Text = ""
            lblNetAmountData.Text = ""
            Return
        ElseIf Not IsNumeric(TextBox4.Text) Then
            Alert("Sadece sayısal değer giriniz!", Me)
            TextBox4.Text = ""
            TextBox3.Text = ""
            lblNetAmountSes.Text = ""
            lblNetAmountData.Text = ""
            Return
        ElseIf Not ((0 <= CDbl(TextBox4.Text)) AndAlso (CDbl(TextBox4.Text) <= 100)) Then
            Alert("Girilen değer 0 ve 100 arasında olmalıdır!", Me)
            TextBox4.Text = ""
            TextBox3.Text = ""
            lblNetAmountSes.Text = ""
            lblNetAmountData.Text = ""
            Return
        End If
        TextBox3.Text = 100 - CDbl(TextBox4.Text)

        lblNetAmountSes.Text = "Ses:" & CDbl(lblTariffBasePrice.Text) * CDbl(TextBox3.Text) / 100 & "TL"
        lblNetAmountSes.Visible = True
        lblNetAmountData.Text = "Data:" & CDbl(lblTariffBasePrice.Text) * CDbl(TextBox4.Text) / 100 & "TL"
        lblNetAmountData.Visible = True
    End Sub

    Protected Sub txtTariffOverPriceVoice_TextChanged(sender As Object, e As EventArgs) Handles txtTariffOverPriceVoice.TextChanged
        If Not IsNumeric(txtTariffOverPriceVoice.Text) Then
            txtTariffOverPriceVoice.Text = ""
            Alert("Sadece sayısal değer giriniz!", Me)
            Return
        End If
    End Sub

    Protected Sub txtTariffOverPriceData_TextChanged(sender As Object, e As EventArgs) Handles txtTariffOverPriceData.TextChanged
        If Not IsNumeric(txtTariffOverPriceData.Text) Then
            txtTariffOverPriceData.Text = ""
            Alert("Sadece sayısal değer giriniz!", Me)
            Return
        End If
    End Sub


    Protected Sub btnSearchKeywordProration_Click(sender As Object, e As EventArgs) Handles btnSearchKeywordProration.Click
        ddlMonthyFeeProrationSameAs.Items.Clear()
        ddlMonthyFeeProrationSameAs.DataSource = DataEngine.GetGeneralTariffList(txtKeywordProration.Text.Trim())
        ddlMonthyFeeProrationSameAs.DataBind()
        If ddlMonthyFeeProrationSameAs.Items.Count = 0 Then
            lblErr02.Text = "Girdiğiniz değerle eşleşen bir tarife bulunamamıştır. Lütfen yeni bir değer giriniz."
            Return
        End If

        ddlMonthyFeeProrationSameAs.Items.Insert(0, New ListItem("Seçiniz", "0"))
        ddlMonthyFeeProrationSameAs.SelectedIndex = 0
        txtKeywordProration.Text = Nothing
        sameAsLabel02.Text = Nothing
        lblErr02.Text = Nothing
        sameAsBox02_a.Visible = False
        sameAsBox02_b.Visible = True
    End Sub

    Protected Sub ddlMonthyFeeProrationSameAs_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ddlMonthyFeeProrationSameAs.SelectedIndexChanged
        sameAsBox02_b.Visible = False
        sameAsLabel02.Text = ddlMonthyFeeProrationSameAs.SelectedValue.ToString & " - " & ddlMonthyFeeProrationSameAs.Items(ddlMonthyFeeProrationSameAs.SelectedIndex).ToString & " tarifesinden ""same as"" alınmıştır."
        sameAsBox02_c.Visible = True
        'finalStatus.Visible = False

        ddlMonthyFeeProration.SelectedIndex = DataEngine.GetProrationInfo(ddlMonthyFeeProrationSameAs.SelectedValue)
        
    End Sub

    Protected Sub ddlMonthyFeeProration_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ddlMonthyFeeProration.SelectedIndexChanged
        If ddlMonthyFeeProration.SelectedValue.Equals("SameAs") Then
            sameAsBox02_a.Visible = True
        End If
    End Sub

    Protected Sub ddlHotlineMF_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ddlHotlineMF.SelectedIndexChanged
        If ddlHotlineMF.SelectedValue.Equals("SameAs") Then
            sameAsBox03_a.Visible = True
        End If
    End Sub

    Protected Sub btnSearchKeywordHotlineMF_Click(sender As Object, e As EventArgs) Handles btnSearchKeywordHotlineMF.Click
        ddlHotlineMFSameAs.Items.Clear()
        ddlHotlineMFSameAs.DataSource = DataEngine.GetGeneralTariffList(txtKeywordProration.Text.Trim())
        ddlHotlineMFSameAs.DataBind()
        If ddlHotlineMFSameAs.Items.Count = 0 Then
            lblErr03.Text = "Girdiğiniz değerle eşleşen bir tarife bulunamamıştır. Lütfen yeni bir değer giriniz."
            Return
        End If

        ddlHotlineMFSameAs.Items.Insert(0, New ListItem("Seçiniz", "0"))
        ddlHotlineMFSameAs.SelectedIndex = 0
        txtKeywordHotlineMF.Text = Nothing
        sameAsLabel03.Text = Nothing
        lblErr03.Text = Nothing
        sameAsBox03_a.Visible = False
        sameAsBox03_b.Visible = True
    End Sub

    Protected Sub ddlHotlineMFSameAs_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ddlHotlineMFSameAs.SelectedIndexChanged
        sameAsBox03_b.Visible = False
        sameAsLabel03.Text = ddlHotlineMFSameAs.SelectedValue.ToString & " - " & ddlHotlineMFSameAs.Items(ddlHotlineMFSameAs.SelectedIndex).ToString & " tarifesinden ""same as"" alınmıştır."
        sameAsBox03_c.Visible = True
        'finalStatus.Visible = False
        'alt satırdaki data engine değişecek
        ddlHotlineMF.SelectedIndex = DataEngine.GetProrationInfo(ddlMonthyFeeProrationSameAs.SelectedValue)
    End Sub
End Class